package com.project.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@ApiModel(value = "Vehicle",description = "车辆信息")
public class Vehicle implements Serializable,Cloneable {
    /**
     * 车辆ID
     */
    @ApiModelProperty(value = "车辆ID",example = "1")
    private Integer vehicle_id;
    /**
     * 车牌号
     */
    @ApiModelProperty(value = "车牌号",example = "A00000")
    @NotBlank(message = "车牌号不能为空")
    @Pattern(regexp = "/^$|^([京津晋冀蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新][ABCDEFGHJKLMNPQRSTUVWXY][1-9DF][1-9ABCDEFGHJKLMNPQRSTUVWXYZ]\\d{3}[1-9DF]|[京津晋冀蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新][ABCDEFGHJKLMNPQRSTUVWXY][\\dABCDEFGHJKLNMxPQRSTUVWXYZ]{5})$/",
            message = "车牌号要填写正确格式")
    private String vehicle_code;
    /**
     * 用户ID
     */
    @ApiModelProperty(value = "车辆关联的用户ID",example = "1")
    private Integer vehicle_uid;

    @ApiModelProperty(value = "用户信息",example = "user")
    private Users users;
    @ApiModelProperty(value = "车辆大小",example = "大、中、小")
    @Pattern(regexp = "/\\b(大|中|小)\\b/")
    private String vehicle_size;
    /**
     * 车辆颜色
     */
    @ApiModelProperty(value = "车辆颜色",example = "红、白、蓝")
    @Pattern(regexp = "/\\b(黑色|白色|红色|蓝色|灰色|银色)\\b/")
    private String vehicle_color;
    /**
     * 车辆图片
     */
    @ApiModelProperty(value = "车辆图片",example = " ")
    private String vehicle_photo;
}
